Introduction
While there are many options for scales, .netCHARTING can automatically determine the appropriate scales based on your data. This tutorial will demonstrate how element data influences axis scales.
The Y Axis ( value axis )
We will call this the y axis but by 'value axis' we don't literally mean (Y) axis. With ChartType.ComboHorizontal for instance we would be referring to the x axis. For all others however it is the y axis. The element values that influence this axis are
- YValue
- YValueStart
- YDateTime
- YDateTimeStart
[New in v5.0] The elements of a series can be excluded from the axis scale range using Series.ExcludeFromAxisRange = true |
The automatically chosen axis scales here are either Normal or Time. It is determined by whether the YValue (numeric) or YDateTime (time) values are specified for each element.
The following table shows value settings of these element properties that the chart engine will consider not set.
|
The X Axis (Category / Value Axis)
Y Axis using ChartType.ComboHorizontal |
The x axis is very powerful, it can operate just like the y axis value axis as well as a category axis. If the elements have names (Element.Name) specified, the axis scale will be a category scale. However, if the elements have either XValue or XDateTime properties set, the appropriate value axis scale will be chosen.
The element properties that influence the x axis type are:
- Name
- XValue
- XValueStart
- XDateTime
- XDateTimeStart
Even if all numeric or time values are provided, setting any of the element's Name properties will yield a category axis scale and values will become names for elements without specified names. |
Setting the scale through DefaultAxis.Scale will not produce the same result. |
[C#]
Chart.XAxis.Scale = Scale.Time;
[Visual Basic]
Chart.XAxis.Scale = Scale.Time